First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318269 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/unordered_set b/include/unordered_set index a14fb00..3ae024a 100644 --- a/include/unordered_set +++ b/include/unordered_set 
@@ -450,7 +450,7 @@  allocator_type get_allocator() const _NOEXCEPT  {return allocator_type(__table_.__node_alloc());}   - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY  bool empty() const _NOEXCEPT {return __table_.size() == 0;}  _LIBCPP_INLINE_VISIBILITY  size_type size() const _NOEXCEPT {return __table_.size();} @@ -968,7 +968,7 @@  allocator_type get_allocator() const _NOEXCEPT  {return allocator_type(__table_.__node_alloc());}   - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY  bool empty() const _NOEXCEPT {return __table_.size() == 0;}  _LIBCPP_INLINE_VISIBILITY  size_type size() const _NOEXCEPT {return __table_.size();}